package com.lagou.service;

import com.lagou.pojo.Token;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface TokenMapper {

    @Select("count token from lagou_token where token = #{token}")
    Integer hasToken(@Param("token") String token);

    @Insert("insert into lagou_token (email, token) values (#{email}, #{token})")
    Integer addToken(Token token);

}
